package cn.edu.nwpu.warehousemanagement.service;

import cn.edu.nwpu.warehousemanagement.pojo.Result;
import cn.edu.nwpu.warehousemanagement.pojo.User;
import cn.edu.nwpu.warehousemanagement.pojo.request.*;
import org.springframework.stereotype.Service;

/**
 * 用户服务接口
 *
 * @author Loadstar
 * @version 1.0
 */
@Service
public interface UserService {
    User findByUserName(String username);

    Result<?> register(String username, String password, String realName, String phone, String email, String role);

    Result<?> login(String username, String password);

    Result<?> updatePassword(UpdatePWRequest params, String token);

    Result<?> login(LoginRequest request, String token);

    User findById(Long id);

    Result<?> register(RegisterRequest registerRequest);

    Result<?> logout(String token);

    Result<?> getUserInfo();

    Result<?> updateUserInfo(UpdateSelfInfoRequest request);

    Result<?> adminUpdatePassword(AdminUpdatePWRequest adminUpdatePWRequest);

    Result<?> easyLogin(LoginRequest request, String token);
}
